<?php


namespace app\common\model;


class Message extends Base
{
    public $tableName = '公告';             // 数据表名称
    public $logId     = ['id']; // 日志操作相关标识
    protected $table  = "maniac_notice";
    protected $createTime = "created_at";
    protected $updateTime = "updated_at";
    protected $autoWriteTimestamp = "datetime";     // 自动写入时间戳


    const TYPE_NOTICE = 0;//平台公告
    const TYPE_INTRODUCE = 1;//平台介绍
    const IS_RECOMMEND_YES = 1;//首页推荐 是
    const IS_RECOMMEND_NO = 0;//否
    public function getRecommendTxtAttr($value, $data)
    {
        $status = [0=>'否',1=>'是'];
        return $status[$data['recommend']];
    }
}